Skip to content

Refresh documentation navigation#2711

Draft
claudiacodacy wants to merge 1 commit into
masterfrom
codex/docs-navigation-refresh
Draft

Refresh documentation navigation#2711
claudiacodacy wants to merge 1 commit into
masterfrom
codex/docs-navigation-refresh

Conversation

@claudiacodacy

Copy link
Copy Markdown
Contributor

Summary

  • reorganize documentation into platform, developer tools, administration, and release notes
  • add responsive top-level navigation and mobile product switching
  • refresh the documentation homepage and navigation styling

Validation

@github-actions

Copy link
Copy Markdown
Contributor

Overall readability score: 53.93 (🔴 -0.06)

File Readability
index.md 20.12 (🔴 -14.37)
View detailed metrics

🟢 - Shows an increase in readability
🔴 - Shows a decrease in readability

File Readability FRE GF ARI CLI DCRS
index.md 20.12 19.37 18.31 16.1 14.67 10.67
  🔴 -14.37 🔴 -5.41 🔴 -2.29 🔴 -1 🔴 -2.37 🔴 -1.48

Averages:

  Readability FRE GF ARI CLI DCRS
Average 53.93 42.96 10.94 12.34 12.29 8.04
  🔴 -0.06 🔴 -0.02 🔴 -0.01 🟢 +0 🔴 -0.01 🔴 -0.01
View metric targets
Metric Range Ideal score
Flesch Reading Ease 100 (very easy read) to 0 (extremely difficult read) 60
Gunning Fog 6 (very easy read) to 17 (extremely difficult read) 8 or less
Auto. Read. Index 6 (very easy read) to 14 (extremely difficult read) 8 or less
Coleman Liau Index 6 (very easy read) to 17 (extremely difficult read) 8 or less
Dale-Chall Readability 4.9 (very easy read) to 9.9 (extremely difficult read) 6.9 or less

@codacy-production

codacy-production Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Not up to standards ⛔

🔴 Issues 1 high

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
Security 1 high (1 false positive)

View in Codacy

🟢 Metrics 21 complexity · 0 duplication

Metric Results
Complexity 21
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request reorganizes the documentation structure and introduces a new tabbed navigation layout with updated responsive styling. The feedback focuses on optimizing a resize event listener in JavaScript to prevent layout thrashing, and simplifying redundant direction-specific CSS rules across several stylesheets by using modern logical properties like margin-inline and padding-inline-end.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +6 to +23
function closeDrawerForPersistentLayout() {
if (!window.matchMedia("(min-width: 60em)").matches) {
return;
}

var drawerToggle = document.querySelector("#__drawer");
var drawerTrigger = document.querySelector("[data-drawer-trigger]");
if (drawerToggle && drawerToggle.checked) {
drawerToggle.checked = false;
drawerToggle.dispatchEvent(new Event("change"));
}

syncBackgroundInertState();
if (drawerTrigger) {
drawerTrigger.setAttribute("aria-expanded", "false");
drawerTrigger.setAttribute("aria-label", "Open navigation");
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The closeDrawerForPersistentLayout function is registered as a resize event listener. Since resize events fire rapidly during window resizing, executing DOM queries, querySelectorAll, and attribute modifications on every tick can cause significant layout thrashing and performance degradation (jank). Since we only need to reset the layout when the drawer is actually open, we can return early if the drawer is not checked.

function closeDrawerForPersistentLayout() {
    if (!window.matchMedia("(min-width: 60em)").matches) {
        return;
    }

    var drawerToggle = document.querySelector("#__drawer");
    if (!drawerToggle || !drawerToggle.checked) {
        return;
    }

    var drawerTrigger = document.querySelector("[data-drawer-trigger]");
    drawerToggle.checked = false;
    drawerToggle.dispatchEvent(new Event("change"));

    syncBackgroundInertState();
    if (drawerTrigger) {
        drawerTrigger.setAttribute("aria-expanded", "false");
        drawerTrigger.setAttribute("aria-label", "Open navigation");
    }
}

Comment on lines +10 to +13
[dir="ltr"] .md-content__inner { margin-left: var(--docs-content-inset); margin-right: var(--docs-content-inset); }
[dir="rtl"] .md-content__inner { margin-right: var(--docs-content-inset); margin-left: var(--docs-content-inset); }
[dir="ltr"] .md-path { margin-left: var(--docs-content-inset); margin-right: var(--docs-content-inset); }
[dir="rtl"] .md-path { margin-right: var(--docs-content-inset); margin-left: var(--docs-content-inset); }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since both the LTR and RTL rules set both the left and right margins to the same value (var(--docs-content-inset)), we can simplify these rules into a single, direction-independent declaration using the CSS logical property margin-inline. This is cleaner, more modern, and consistent with the existing use of margin-inline and padding-inline in this file.

Suggested change
[dir="ltr"] .md-content__inner { margin-left: var(--docs-content-inset); margin-right: var(--docs-content-inset); }
[dir="rtl"] .md-content__inner { margin-right: var(--docs-content-inset); margin-left: var(--docs-content-inset); }
[dir="ltr"] .md-path { margin-left: var(--docs-content-inset); margin-right: var(--docs-content-inset); }
[dir="rtl"] .md-path { margin-right: var(--docs-content-inset); margin-left: var(--docs-content-inset); }
.md-content__inner { margin-inline: var(--docs-content-inset); }
.md-path { margin-inline: var(--docs-content-inset); }

Comment on lines +7 to +8
[dir="ltr"] .md-sidebar--primary .md-nav__link,
[dir="rtl"] .md-sidebar--primary .md-nav__link { margin: 0; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since both LTR and RTL rules apply the exact same margin: 0 to .md-sidebar--primary .md-nav__link, the direction-specific selectors are redundant. We can simplify this to a single selector.

Suggested change
[dir="ltr"] .md-sidebar--primary .md-nav__link,
[dir="rtl"] .md-sidebar--primary .md-nav__link { margin: 0; }
.md-sidebar--primary .md-nav__link { margin: 0; }

Comment on lines 36 to 42
[dir="ltr"] .md-sidebar--primary .md-sidebar__inner { padding-right: 0; }
[dir="rtl"] .md-sidebar--primary .md-sidebar__inner { padding-left: 0; }

.md-sidebar--primary .md-sidebar__inner,
.md-sidebar--primary .md-nav--primary { width: 100%; max-width: none; box-sizing: border-box; }
.md-sidebar--primary .md-sidebar__inner { width: 100%; height: 100%; max-width: none; box-sizing: border-box; }
.md-sidebar--primary .md-nav--primary { width: 100%; height: auto; min-height: 100%; max-width: none; box-sizing: border-box; }
[dir="ltr"] .md-sidebar--secondary .md-sidebar__inner { padding-right: 2rem; }
[dir="rtl"] .md-sidebar--secondary .md-sidebar__inner { padding-left: 2rem; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

We can simplify these direction-specific padding rules by using the CSS logical property padding-inline-end. This eliminates the need for separate [dir="ltr"] and [dir="rtl"] selectors, making the stylesheet cleaner and more maintainable.

Suggested change
[dir="ltr"] .md-sidebar--primary .md-sidebar__inner { padding-right: 0; }
[dir="rtl"] .md-sidebar--primary .md-sidebar__inner { padding-left: 0; }
.md-sidebar--primary .md-sidebar__inner,
.md-sidebar--primary .md-nav--primary { width: 100%; max-width: none; box-sizing: border-box; }
.md-sidebar--primary .md-sidebar__inner { width: 100%; height: 100%; max-width: none; box-sizing: border-box; }
.md-sidebar--primary .md-nav--primary { width: 100%; height: auto; min-height: 100%; max-width: none; box-sizing: border-box; }
[dir="ltr"] .md-sidebar--secondary .md-sidebar__inner { padding-right: 2rem; }
[dir="rtl"] .md-sidebar--secondary .md-sidebar__inner { padding-left: 2rem; }
.md-sidebar--primary .md-sidebar__inner { padding-inline-end: 0; }
.md-sidebar--primary .md-sidebar__inner { width: 100%; height: 100%; max-width: none; box-sizing: border-box; }
.md-sidebar--primary .md-nav--primary { width: 100%; height: auto; min-height: 100%; max-width: none; box-sizing: border-box; }
.md-sidebar--secondary .md-sidebar__inner { padding-inline-end: 2rem; }

Comment on lines 85 to 86
[dir="ltr"] .md-sidebar--primary .md-sidebar__inner { padding-right: .75rem; }
[dir="rtl"] .md-sidebar--primary .md-sidebar__inner { padding-left: .75rem; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similarly, we can simplify these direction-specific padding rules using padding-inline-end to avoid redundant LTR/RTL selectors.

Suggested change
[dir="ltr"] .md-sidebar--primary .md-sidebar__inner { padding-right: .75rem; }
[dir="rtl"] .md-sidebar--primary .md-sidebar__inner { padding-left: .75rem; }
.md-sidebar--primary .md-sidebar__inner { padding-inline-end: .75rem; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant